#ifndef SIN_PATH_H_
#define SIN_PATH_H_

// INCLUDES //
#include "path.h"
//////////////

/**
* A path that follows a sin arc.
* 
* @author dfoelber
**/
class SinPath : public Path
{
public:
	/**
	* Constructor
	* 
	* @param originX The origin's X coordinate
	* @param originY The origin's Y coordinate
	* @param destX The destination's X coordinate
	* @param destY The destination's Y coordinate
	* @param apexX The apex's X coordinate
	* @param apexY The apex's Y coordinate
	* @param vel Velocity of the path
	**/
	SinPath( int originX, int originY, int destX, int destY, int apexX, int apexY, double vel = 35.0 );
	
	/**
	* Lets the path know that time has passed and to move accordingly.
	* 
	* Overridden from Path.
	* 
	* @param ms The time passed since last called
	**/
	virtual void TimePassed( int ms );
	
	/**
	* Check if this path collided with another path.
	* 
	* Overridden from Path.
	* 
	* @param other The other path.
	**/
	virtual void CheckCollision( Path* other );
	
	/**
	* Gets if the path is still moving.
	* 
	* Overridden from Path.
	* 
	* @return If the path is moving
	**/
	virtual bool IsMoving();
	
private:
	void CalculateCoordinates( double x, double y, double distance, double* newX, double* newY );
	
private:
	/// The velocity
	double		velocity;
	/// Origin X coordinate
	int			originX;
	/// Origin Y coordinate
	int			originY;
	/// Dest X coordinate
	int			destX;
	/// Dest y coordinate
	int			destY;
	/// Apex x coordinate
	int			apexX;
	/// Apex y coordinate
	int			apexY;
};
#endif /*SIN_PATH_H_*/
